package com.pur.zsms.foodmanage.food.service;

import java.util.List;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.foodmanage.food.po.FoodPo;
import com.pur.zsms.foodmanage.food.po.FoodTypePo;
import com.pur.zsms.foodmanage.food.vo.FoodMaterVo;
import com.pur.zsms.foodmanage.food.vo.FoodTypeVo;
import com.pur.zsms.foodmanage.food.vo.FoodVo;
import com.pur.zsms.matermanage.mater.vo.ShoppingCartMaterVo;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.role.vo.RoleVo;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.vo.ShoppingCartCashierVo;

public interface IFoodService {

	String msg = "";

	public String getMsg();

	public void setMsg(String msg);

	/**
	 * 查询用户信息
	 * 
	 * @param
	 * @return
	 */
	public PaginationSupport listFood(PageController pageController, FoodVo foodVo) throws GenericException;

	public PaginationSupport listFoodForCashier(PageController pageController, FoodVo foodVo) throws GenericException;

	public List<Object[]> listFoodForCashier(FoodVo foodVo) throws GenericException;

	public PaginationSupport listFoodIndex(PageController pageController, FoodVo foodVo) throws GenericException;

	public PaginationSupport listFoodMaterDetailed(PageController pageController, FoodMaterVo foodMaterVo) throws GenericException;

	public PaginationSupport findShoppingCartCashier(PageController pageController, ShoppingCartCashierVo tShoppingCartCashierVo)
			throws GenericException;

	public PaginationSupport getShoppingCartOrderTable(PageController pageController, ShoppingCartCashierVo tShoppingCartCashierVo)
			throws GenericException;

	/**
	 * 新增用户信息
	 */
	public int addFood(FoodVo c) throws GenericException;

	public void addFoodType(FoodTypeVo c) throws GenericException;

	/**
	 * 新增菜品校验
	 */
	public String addFoodCheck(FoodVo c) throws GenericException;

	/**
	 * 新增用户信息
	 */
	public void addFoodMater(List<FoodMaterVo> c) throws GenericException;

	public void updateFood(FoodVo c) throws GenericException;

	/**
	 * 查询菜品id
	 */
	public FoodVo getFoodid(String c) throws GenericException;

	public List<FoodPo> getFoodPo(FoodVo c) throws GenericException;

	/**
	 * 查询菜品id
	 */
	public String getFoodMaterId(String c) throws GenericException;

	/**
	 * 修改用户信息
	 */
	public void updateUser(UserVo c) throws GenericException;

	public void deleteFood(int foodId) throws GenericException;

	public void deleteShoppingCartCashierPo(ShoppingCartCashierVo c) throws GenericException;

	public void deleteShoppingCartOne(ShoppingCartCashierVo c) throws GenericException;

	/**
	 * 根据用户ID查询出所有用户信息
	 * 
	 * @return
	 */
	public UserVo listUserByUserId(String userId) throws GenericException;

	/**
	 * 根据用户ID查询出该用户所有用户角色信息,同时没有分配给该用户的角色也查出来
	 * 使用RoleVo的checked字段进行区分，为true代表分配给该用户的角色
	 * 
	 * @param UserId
	 *            用户ID
	 * @return 用户角色信息
	 * @throws GenericException
	 */
	public List<RoleVo> listRoleByUserId(String userId) throws GenericException;

	/**
	 * 根据用户ID更新该用户的用户角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return
	 * @throws GenericException
	 */
	public void updateRoleByUserId(String userId, String[] roles) throws GenericException;

	/**
	 * 根据用户名查找用户
	 */
	public UserPo findUserLogon(String userName, String password) throws GenericException;

	/**
	 * 查询用户所对应菜单
	 * 
	 * @param userId
	 * @return
	 */
	public List<MenuPo> getUserMenuList(String userId) throws GenericException;

	public List<RoleVo> listAllRole() throws GenericException;

	public List<FoodTypePo> getFoodType(FoodTypeVo c) throws GenericException;

	public boolean addShoppingCartCashier(ShoppingCartCashierVo c) throws GenericException;

	public boolean updateShoppingCartCashier(ShoppingCartCashierVo c) throws GenericException;

	public List<Object[]> getShoppingCartCasherTotalValue(ShoppingCartCashierVo c) throws GenericException;

	public List<Object[]> getCartOrderNumber(long shopId) throws GenericException;

	public boolean receiptCommit(ShoppingCartCashierVo c) throws GenericException;

	public String pulldownFoodTypeForShop(long shopId, String space) throws GenericException;

}
